﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/ADAdminLayout.master" AutoEventWireup="true" CodeFile="bao_cao_ban_hang_thoi_gian.aspx.cs" Inherits="admin_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<div class="block" id="block-tables">
        <div class="content">
            <h2 class="title">
                &nbsp;<a href=bao_cao_ban_hang.aspx>Thống kê theo doanh nghiệp</a>
&nbsp;&nbsp;
                <a href=bao_cao_ban_hang_thoi_gian.aspx>Thống kê theo tháng</a>
            </h2>
                <div class="inner">
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:babydealConnectionString %>" 
        
                        SelectCommand="SELECT MONTH(ngay_gio_in_phieu) AS Expr2, YEAR(ngay_gio_in_phieu) AS Expr3, SUM(gia_goc) AS Expr1 FROM mua_hang GROUP BY MONTH(ngay_gio_in_phieu), YEAR(ngay_gio_in_phieu)">
    </asp:SqlDataSource>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="table" 
        DataSourceID="SqlDataSource1" Style="margin-right: 31px" CellPadding="4" PageSize="5" AlternatingRowStyle-CssClass="odd" RowStyle-CssClass="even">
<AlternatingRowStyle CssClass="odd"></AlternatingRowStyle>
        <Columns>
            <asp:BoundField DataField="Expr2" HeaderText="Tháng" 
                SortExpression="Expr2" ReadOnly="True" />
            <asp:BoundField DataField="Expr3" HeaderText="Năm" ReadOnly="True" 
                SortExpression="Expr3" />
            <asp:BoundField DataField="Expr1" HeaderText="Doanh số" ReadOnly="True" 
                SortExpression="Expr1" />
        </Columns>

<RowStyle CssClass="even"></RowStyle>
    </asp:GridView>
    </div>
    </div>
    </div>
</asp:Content>

